﻿<UserControl
    x:Class="Demo.OData.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600">

	<Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">

		<Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">

			<navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                              Source="/NW" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
				<navigation:Frame.UriMapper>
					<uriMapper:UriMapper>
						<uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
						<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
					</uriMapper:UriMapper>
				</navigation:Frame.UriMapper>
			</navigation:Frame>
		</Border>

		<Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}" Height="52">
			<Grid.ColumnDefinitions>
				<ColumnDefinition  Width="Auto"/>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>

			<Border x:Name="BrandingBorder" Grid.Column="0" Style="{StaticResource BrandingBorderStyle}">
				<StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">

					<ContentControl Style="{StaticResource LogoIcon}"/>
					<TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}" 
                               Text="ODataSource Control"/>

				</StackPanel>
			</Border>

			<Border x:Name="LinksBorder" Grid.Column="1" Style="{StaticResource LinksBorderStyle}" HorizontalAlignment="Stretch">
				<StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">

          <HyperlinkButton x:Name="Link_Basic" Style="{StaticResource LinkStyle}" 
						Content="Basic"
						NavigateUri="/Basic" TargetName="ContentFrame" >
          </HyperlinkButton>

          <Rectangle  Style="{StaticResource DividerStyle}"/>

          <HyperlinkButton x:Name="Link_NW" Style="{StaticResource LinkStyle}" 
						Content="Master-Detail"
						NavigateUri="/NW" TargetName="ContentFrame" >
          </HyperlinkButton>


        </StackPanel>
			</Border>
			<Border  Grid.Column="2" Style="{StaticResource LinksBorderStyle}" HorizontalAlignment="Stretch">
				<StackPanel  Style="{StaticResource LinksStackPanelStyle}">
					<HyperlinkButton x:Name="Link2"  Style="{StaticResource LinkStyle}" 
                 NavigateUri="/About" TargetName="ContentFrame" Content="about"/>
				</StackPanel>
			</Border>

		</Grid>

	</Grid>

</UserControl>